package com.syy.framework.web.mapper;

import com.syy.common.core.domain.BaseMapperX;
import com.syy.system.domain.SysUserRole;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;
import java.util.List;

@Mapper
public interface UserRoleMapper extends BaseMapperX<SysUserRole> {

    default List<SysUserRole> selectListByUserId(Long userId) {
        return selectList(SysUserRole::getUserId, userId);
    }

    default List<SysUserRole> selectListByRoleIds(Collection<Long> roleIds) {
        return selectList(SysUserRole::getRoleId, roleIds);
    }
}

